package com.gov.dna;

import com.gov.dna.common.util.ObjectUtil;
import io.swagger.annotations.ApiModelProperty;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

public class Build {

    public static void main(String[] args) {
        try {
            Class  cc=Class.forName("com.gov.dna.admin.entity.Permission");
            List<String> list = new ArrayList<String>();
            while (cc != null) {
                Field[] fields = cc.getDeclaredFields();
                for (int i = 0; i < fields.length; i++) {
                    if (fields[i].getModifiers() == 2) {
                        list.add(fields[i].getName());
                        ApiModelProperty [] as=fields[i].getAnnotationsByType(ApiModelProperty.class);
                        System.out.println(as[0].value());
                    }
                }
                cc = cc.getSuperclass();
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
